#include <stdio.h>
#include <string.h>
#include <stdlib.h>

struct node {int i;};

int main(int argc, const char *argv[])
{
    struct node **nodes;

    nodes = (struct nodes**)malloc(10*sizeof(struct node*));

    for (int i = 0; i < 10; i++) {
        nodes[i] = (struct node*)malloc(sizeof(struct node));
        if (nodes[i])
            scanf("%d", &nodes[i]->i);
    }

    for (int i = 0; i < 10; i++) {
        printf("%d\n", nodes[i]->i);
        free(nodes[i]);
        nodes[i] = NULL;
    }
    free(nodes);
    // free memory
    //
    return 0;
}
